from django.db import models
from apps.sale.models import *
from django.contrib.auth import get_user_model
User = get_user_model()

# 业务沟通记录表
class SaleVisiting(models.Model):
    A002 = models.DateTimeField(null=True, auto_now_add=True,verbose_name='创建时间')
    F001 = models.ForeignKey(Customer, on_delete=models.CASCADE,verbose_name='客户')
    B001 = models.CharField(max_length=10, null=True,verbose_name='联系人')
    B002 = models.CharField(max_length=10, null=True,verbose_name='业务员')
    B003 = models.DateTimeField(null=True,verbose_name='联系时间')
    B004 = models.CharField(max_length=10,verbose_name='联系目的')
    B005 = models.CharField(max_length=10,verbose_name='沟通方式')
    B006 = models.CharField(max_length=10, null=True,verbose_name='客户状态')
    B007 = models.CharField(max_length=15, null=True,verbose_name='通话结果')
    B008 = models.TextField(null=True,verbose_name='备注')
    B009 = models.TextField(null=True,verbose_name='摘录价值信息')

    D001 = models.CharField(max_length=20, null=True, verbose_name='保护膜种类')
    D002 = models.CharField(max_length=20, null=True, verbose_name='被贴物类型')
    D003 = models.CharField(max_length=10, null=True, verbose_name='月使用量')
    D004 = models.CharField(max_length=10, null=True, verbose_name='月采购金额')
    D005 = models.CharField(max_length=20, null=True, verbose_name='使用情况')
    D006 = models.CharField(max_length=30, null=True, verbose_name='供应厂商')
    D007 = models.CharField(max_length=10, null=True, verbose_name='供应单价')

    class Meta:
        verbose_name = '业务沟通记录表'
        verbose_name_plural = verbose_name
